/*
 * Copyright (C) 2010-2011 Comcast Cable.  All Rights Reserved.
 */
package com.hercules.android.receiver;

/**
 * This interface defines the contract for handling errors from the AndroidReceiver.
 * <p>
 * <b>Thread Safety:</b> Implementations are expected to be effectively thread-safe.
 *
 * @author argolite, 7realm
 * @version 1.0
 */
public interface AndroidReceiverErrorHandler {
    /**
     * Handles the connection error in the given receiver. The error is described in the message.
     *
     * @param androidReceiver the AndroidReceiver raising the error
     * @param message the error message
     */
    void onConnectError(AndroidReceiver androidReceiver, String message);

    /**
     * Handles the shutdown error in the given receiver. The error is described in the message.
     *
     * @param androidReceiver the AndroidReceiver raising the error
     * @param message the error message
     */
    void onShutdownError(AndroidReceiver androidReceiver, String message);

    /**
     * Handles the closing error in the given receiver. The error is described in the message.
     *
     * @param androidReceiver the AndroidReceiver raising the error
     * @param message the error message
     */
    void onCloseError(AndroidReceiver androidReceiver, String message);
}